﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="../../Content/metro.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="../../Content/bootstrap/js/bootstrap.js" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="../../Scripts/jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>
</head>

    <body>
        <div class="pagecontainer4r">
            <div class="banner4r">
                <a href="#" target="_self" class="logo4r"></a>
            </div>
            <div class="menu4r">
                <div class="navbar">
                    <div class="navbar-inner">
                    <div class="container">
                        <div class="nav-collapse collapse">
                            <ul class="nav nav-tabs">
                                <li class="">
                                    <a href=@Url.Action("Index","Home")>Trang chủ</a>
                                </li>
                                @if (User.IsInRole("Admin"))
                                {
                                    <li class="">
                                        <a href=@Url.Action("Index","Admin")>Quản trị</a>
                                    </li>
                                }
                                <li class="">
                                    @if (Request.IsAuthenticated)
                                    {
                                        <a href=@Url.Action("MyProfile", "Account")>Trang cá nhân</a>
                                    }
                                    @if (!Request.IsAuthenticated)
                                    {
                                        <a href=@Url.Action("LogOn", "Account")>Đăng nhập</a>
                                    }
                                </li>
                                <li class="">
                                    @if (Request.IsAuthenticated)
                                    {
                                        <a href=@Url.Action("LogOff", "Account")>Thoát</a>
                                    }
                                    @if (!Request.IsAuthenticated)
                                    {
                                        <a href=@Url.Action("Register", "Account")>Đăng ký</a>
                                    }
                                </li>
                                <li class="">
                                    <a href="http://localhost:3628" target="_blank">Website</a>
                                </li>
                            </ul>
                            <span class="navbar-search pull-right">
                                @using (Html.BeginForm("Search", "Home", FormMethod.Post))
                                {
                                    <input id="keyword" type="text" name="keyword" class="search-query" placeholder="Search"/>
                                }
                            </span>
                        </div>
                    </div>
                    </div>
                </div>
            </div>
            <div class="maincontent4r">
                @RenderBody()
            </div>
            <div class="rightContent4r">
                <a class="btn btn-success btn-large newTopic" href="@Url.Action("CreateTopic", "Topic", new { SelectedId = ViewBag.Category })"> Tạo chủ đề mới </a>
                    
                @if (Request.IsAuthenticated)
                {
                    //Html.RenderPartial("_BoxProfile");
                    Html.RenderAction("BoxProfile","Share");
                }
                    
                <div id="topnew">
                    @{Html.RenderAction("TopNew", "Share");}
                </div>
                <script type="text/javascript">
                    $(function () {
                        setInterval(function () {
                            $.get('<%=Url.Action("TopNew", "Share")%>', {}, function (view) { $("div#topnew").html(view); });
                        }, 5000);
                    }); 
                </script>
                    
                @{Html.RenderAction("BoxCategory", "Share");}
                @{Html.RenderAction("TagCloundPartial", "Share");}
            </div>
            <div class="footer4r">
                
            </div>
        </div>
    </body>
</html>
